package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by DK on 16/11/16.
 * 微信菜单配置
 */
@Table(name = "mall_wechat_menu_Config")
@Entity
@DynamicUpdate
@DynamicInsert
public class MallWechatMenuConfig extends IDEntityMall{

    @Column(columnDefinition = "bigint comment '父类'")
    private Long parentId;

    @Column(columnDefinition = "varchar(50) comment '菜单名称'")
    private String name;

    @Column(columnDefinition = "varchar(255) comment '页面地址'")
    private String pageUrl;

    @Column(columnDefinition = "bigint comment '排序位置'")
    private Long seqNo;

    @Column(columnDefinition = "bigint comment '平台ID'")
    private Long mallId;

    @Column(columnDefinition = "varchar(50) comment '菜单KEY'")
    private String menuKey;

    @Column(columnDefinition = "varchar(50) comment '菜单类型 click  view'")
    private String menuType;

    @Column(columnDefinition = "varchar(30) comment '素材类型 image video voice news'")
    private String materialType;

    @Column(columnDefinition = "varchar(120) comment '素材ID'")
    private String mediaId;

    @Column(columnDefinition = "varchar(120) comment '素材名称'")
    private String materialName;

    @Column(columnDefinition = "varchar(500) comment '素材链接'")
    private String materialUrl;

    public static final String WECHAT_MENU_KEY = "mall_";

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPageUrl() {
        return pageUrl;
    }

    public void setPageUrl(String pageUrl) {
        this.pageUrl = pageUrl;
    }

    public Long getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(Long seqNo) {
        this.seqNo = seqNo;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getMenuKey() {
        return menuKey;
    }

    public void setMenuKey(String menuKey) {
        this.menuKey = menuKey;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }

    public String getMaterialType() {
        return materialType;
    }

    public void setMaterialType(String materialType) {
        this.materialType = materialType;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getMaterialUrl() {
        return materialUrl;
    }

    public void setMaterialUrl(String materialUrl) {
        this.materialUrl = materialUrl;
    }

    @Override
    public String toString() {
        return "MallWechatMenuConfig{" +
                "parentId=" + parentId +
                ", name='" + name + '\'' +
                ", id=" + id +
                ", pageUrl='" + pageUrl + '\'' +
                ", dateCreated=" + dateCreated +
                ", seqNo=" + seqNo +
                ", lastUpdated=" + lastUpdated +
                ", mallId=" + mallId +
                ", menuKey='" + menuKey + '\'' +
                ", isDelete=" + isDelete +
                ", menuType='" + menuType + '\'' +
                ", version=" + version +
                ", materialType='" + materialType + '\'' +
                ", mediaId='" + mediaId + '\'' +
                ", materialName='" + materialName + '\'' +
                ", materialUrl='" + materialUrl + '\'' +
                '}';
    }
}
